package pl.edu.mimuw.irs.rcp.view.figure;

import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;

public class DoubleGradient {

	public static final DoubleGradient BLUE; // 
	public static final DoubleGradient LIGHT_BLUE;
	public static final DoubleGradient BRIGHT_BLUE;
	public static final DoubleGradient GOLD;
	public static final DoubleGradient SILVER;
	public static final DoubleGradient DARK_SILVER;
	public static final DoubleGradient DARK_YELLOW;
	public static final DoubleGradient YELLOW;
	public static final DoubleGradient RED_ORANGE;
	public static final DoubleGradient DARK_GREEN;
	public static final DoubleGradient GREEN;
	static {
		Color top;
		Color upperMiddle;
		Color lowerMiddle;
		Color bottom;
		
		top = new Color(null, new RGB(81, 124, 255));
		upperMiddle = new Color(null, new RGB(68, 189, 255));
		lowerMiddle = new Color(null, new RGB(73, 134, 255));
		bottom = new Color(null, new RGB(0, 19, 255));
		BLUE = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);
		
		top = new Color(null, new RGB(81, 154, 255));
		upperMiddle = new Color(null, new RGB(68, 219, 255));
		lowerMiddle = new Color(null, new RGB(53, 144, 255));
		bottom = new Color(null, new RGB(0, 89, 255));
		LIGHT_BLUE = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);
		
		top = new Color(null, new RGB(0, 174, 255));
		upperMiddle = new Color(null, new RGB(0, 239, 255));
		lowerMiddle = new Color(null, new RGB(0, 164, 255));
		bottom = new Color(null, new RGB(0, 109, 255));
		BRIGHT_BLUE = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);

		top = new Color(null, new RGB(255, 174, 0));
		upperMiddle = new Color(null, new RGB(255, 239, 0));
		lowerMiddle = new Color(null, new RGB(255, 204, 0));
		bottom = new Color(null, new RGB(215, 109, 0));
		GOLD = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);

		top = new Color(null, new RGB(174, 174, 174));
		upperMiddle = new Color(null, new RGB(239, 239, 239));
		lowerMiddle = new Color(null, new RGB(204, 204, 204));
		bottom = new Color(null, new RGB(109, 109, 109));
		SILVER = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);
		
		top = new Color(null, new RGB(144, 144, 144));
		upperMiddle = new Color(null, new RGB(209, 209, 209));
		lowerMiddle = new Color(null, new RGB(174, 174, 174));
		bottom = new Color(null, new RGB(79, 79, 79));
		DARK_SILVER = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);
		
		top = new Color(null, new RGB(255, 174, 0));
		upperMiddle = new Color(null, new RGB(255, 239, 0));
		lowerMiddle = new Color(null, new RGB(255, 184, 0));
		bottom = new Color(null, new RGB(255, 89, 0));
		DARK_YELLOW = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);

		top = new Color(null, new RGB(255, 194, 0));
		upperMiddle = new Color(null, new RGB(255, 255, 0));
		lowerMiddle = new Color(null, new RGB(255, 204, 0));
		bottom = new Color(null, new RGB(255, 109, 0));
		YELLOW = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);
		
		top = new Color(null, new RGB(255, 124, 81));
		upperMiddle = new Color(null, new RGB(255, 189, 68));
		lowerMiddle = new Color(null, new RGB(255, 114, 53));
		bottom = new Color(null, new RGB(255, 59, 0));
		RED_ORANGE = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);

		top = new Color(null, new RGB(0, 124, 0));
		upperMiddle = new Color(null, new RGB(0, 189, 0));
		lowerMiddle = new Color(null, new RGB(0, 114, 0));
		bottom = new Color(null, new RGB(0, 59, 0));
		DARK_GREEN = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);
/*
		top = new Color(null, new RGB(0, 174, 0));
		upperMiddle = new Color(null, new RGB(0, 239, 0));
		lowerMiddle = new Color(null, new RGB(0, 164, 0));
		bottom = new Color(null, new RGB(0, 109, 0));*/
/*
		top = new Color(null, new RGB(17, 174, 34));
		upperMiddle = new Color(null, new RGB(23, 239, 46));
		lowerMiddle = new Color(null, new RGB(16, 164, 32));
		bottom = new Color(null, new RGB(10, 109, 20));*/
		
		top = new Color(null, new RGB(17, 194, 34));
		upperMiddle = new Color(null, new RGB(23, 239, 46));
		lowerMiddle = new Color(null, new RGB(16, 194, 32));
		bottom = new Color(null, new RGB(10, 139, 20));
		GREEN = new DoubleGradient(top, upperMiddle, lowerMiddle, bottom);
	}
	
	// *** Attributes

	private Color top;
	private Color upperMiddle;
	private Color lowerMiddle;
	private Color bottom;
	public Color getTop() {
		return top;
	}
	public Color getUpperMiddle() {
		return upperMiddle;
	}
	public Color getLowerMiddle() {
		return lowerMiddle;
	}
	public Color getBottom() {
		return bottom;
	}
	
	// *** Constructors
	
	public DoubleGradient(Color top, Color upperMiddle, Color lowerMiddle, Color bottom) {
		this.top = top;
		this.upperMiddle = upperMiddle;
		this.lowerMiddle = lowerMiddle;
		this.bottom = bottom;
	}
	
	// *** Methods
}
